package com.example.springdemo.service;

import com.example.springdemo.log.TimeConsume;
import lombok.extern.java.Log;
import lombok.extern.log4j.Log4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * TODO
 *
 * @author pengzhikang
 * @date 2021/11/24 16:53
 * @since 1.0.0
 */
@Service
@Log
public class UserService {

    @Autowired
    private UserService userService;

    @TimeConsume
    public void user() {
        log.info("user");
        userService.user1();
    }

    @TimeConsume
    public void user1() {
        log.info("user1");
        userService.user2();
    }


    @TimeConsume
    private void user2() {
        log.info("user2");
    }
}
